package com.cskaoyan._01basic._08loop._02test;

/**
 * @author Macro_Ray
 * @since 2024/3/4 15:14
 */

/* 逢7过
 * 游戏规则:从任意一个数字开始报数，当你要报的数字是包含7或者是7的倍数时都要说过 过
 * 需求:使用程序在控制台打印出1-100之间的满足逢七必过规则的数据*/
// 5 6 7过  8 9 10  7或7的倍数 个位7  十位7

import java.util.Scanner;

public class _07Advanced_01 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入初始数字：");
        int start = sc.nextInt();
        int number = start;

        if (number>=1&&number<=100){
            for (; number <= 100; number++) {
                if (number % 7 == 0 || number % 10 == 7 || number / 10 == 7){
                    System.out.println("过");
                    continue;
                }
                System.out.println(number);

            }
        }


        /*while (number >= 1 && number < 100) {
            if (number % 7 == 0 || number % 10 == 7 || number / 10 == 7) {
                System.out.println("过");
            }
            number++;
            System.out.println(number);
        }*/
    }
}
